
ifneq ($(KERNELRELEASE),)
MODULE_NAME = hellomodule
$(MODULE_NAME)-objs := hello.o
obj-m := $(MODULE_NAME).o
else
KERNEL_DIR = /lib/modules/`uname -r`/build
MODULEDIR := $(shell pwd)
 
.PHONY: modules
default: modules
 
modules:
	make -C $(KERNEL_DIR) M=$(MODULEDIR) modules
app:
	gcc  app.c -o app   	
clean distclean:
	rm -f *.o *.mod.c .*.*.cmd *.ko app 
	rm -rf .tmp_versions *.symvers *.order
endif
